SQL Server 101 Part 1: The SELECT Statement by Burton Phillip

SQL Server 101 Part 1: The SELECT Statement by Burton Phillip

Author:Burton, Phillip [Burton, Phillip]
Language: eng
Format: azw3
Published: 2017-11-26T16:00:00+00:00


The results are only six rows, all of which weren't created in 2016 and which don't start with "sys".

Now, let's return to this more complicated example.

SELECT O.name, O.object_id as ObjectTypeDescription, O.type_desc,

C.name, C.column_id

FROM sys.objects as O

jOIN sys.columns as C

ON O.object_id = C.object_id

If we wanted to refer to the name column from the table sys_objects, then we would say

WHERE O.name LIKE 'sys%'.

Remember, the percentage sign represents zero to infinite number of characters. So, that would restrict the output to be anything where this name starts with "sys".



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.